<div id="layout_main_top">

</div>
<div id="layout_main">


{if $smarty.session.level gte $USER_RIGHTS.news_add}
<div class="admin_menu">
	<a href='index.php?page=admin_news&action=new'><img src="./images/buttons/raid_add.png" alt="" /> Add News</a>
</div>
{/if}

<DIV class="layout_large_table_top">

</DIV>
<DIV class="layout_large_table">
<table id="main_table" cellspacing='0'>
<tr class="menu_header">
	<th>#</th>
	<th align='left'>
			Subject
	</th>
	<th align='left'>
			Poster
	</th>	
	<th class="left">
			Date
	</th>
	<th>
			Summary
	</th>
	<th>
		&nbsp;
	</th>
</tr>	

{foreach name=news item=news_item from=$news}


	<tr class="{cycle values="row_1,row_2" advance=true}" id="user{$single_user.user_id}">
	<td>{$news_item.news_id}</td>
	<td align='left'>{$news_item.subject}</td>
	<td align='left'>{$news_item.name}</td>
	<td align='left'>{$news_item.date_time_posted}</td>
	<td align='left'>{$news_item.text_body|truncate:35:"...":true|escape:html}</td>
	<td>
	{if $smarty.session.level gte $USER_RIGHTS.news_delete}
	<img src="./images/buttons/delete.gif" alt="" onclick="javascript:deleteNews({$news_item.news_id}, 'admin_news')" />
	{/if}
	{if $smarty.session.level gte $USER_RIGHTS.news_change}
	<a href='index.php?page=admin_news&action=edit&news_id={$news_item.news_id}'><img src="./images/buttons/edit.gif" alt="" width="14" height="14" {popup text="Edit " center=#overlib_center# wrap=#overlib_wrap# offsety=#overlib_offsety# fgcolor=#overlib_fgcolor# bgcolor=#overlib_bgcolor#  textcolor=#overlib_textcolor#} /></a>
	{/if}
	</td>
</tr>	

{foreachelse}
<tr class="{cycle values="row_1,row_2"}">
	<td colspan=6>No news could be found.</td>	
</tr>	

{/foreach}

<tr class="{cycle values="row_1,row_2"}">
	<td colspan=6>

	</td>	
</tr>	

<tr class="menu_footer">
	<td colspan=6></td>	
</tr>	



</table>
</div>

<DIV class="layout_large_table_bottom">

</DIV>
</div>
<div id="layout_main_bottom">

</div>
